package com.proxy.iface.proxy;

import com.proxy.iface.Phone;
import com.proxy.iface.impl.RealPhone;

public class ProxyPhone implements Phone {

    private RealPhone realPhone;

    public ProxyPhone(String telNumber) {
        this.realPhone = new RealPhone(telNumber);
    }

    @Override
    public void call() {
        System.out.println("从代理调用方法：");
        realPhone.call();
    }
}
